package com.eduran.tuts.jfundamentals.model;

/**
 * Created by eduran on 21.10.2014.
 */
public class SumArray {
    public static void main(String[] args) {
        int[] array = {85,45,89,36,63,23,32,25,52,67};
        int total = 0;
        //int total = IntStream.of(array).sum();

        for (int counter = 0; counter < array.length; counter++) {
            total += array[counter];
        }
        System.out.printf("Total of array elements: %d%n", total);
    }
}
